Skip to content

Pre-launch hardening: engine input validation, CI integration job, dashboard polish#7

Merged
1816x merged 3 commits into
mainfrom
claude/project-status-bugs-guezby
Jul 23, 2026
Merged

Pre-launch hardening: engine input validation, CI integration job, dashboard polish#7
1816x merged 3 commits into
mainfrom
claude/project-status-bugs-guezby

Conversation

@1816x

@1816x 1816x commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Small, focused hardening on top of the v0.1.0 release (c33705b) — nothing here changes the vertical slice's behavior on the shipped synthetic data; it closes latent-input holes and a CI blind spot before the code goes public.

Changes

fix(engine) — harden tick price and window parsing

  • price was never validated at parse, unlike size. It feeds VWAP and the log-return ln(price / prev), so a zero, negative or non-finite price produced inf/NaN realized volatility that was written to SQLite and later serialized as invalid JSON. Added a finite_positive_price serde validator mirroring positive_size — the exact class of latent hole the Phase-3 zero-size fix already closed.
  • parse_window multiplied value * unit_ns unchecked; a huge --window overflowed i64 and silently wrapped in release builds. Now uses checked_mul and returns a clear "too large" error.

ci — guard the cross-language pipeline

  • The three per-stack jobs never exercised scripts/demo.sh / scripts/verify_pipeline.sh, so the flagship make demo path could break while CI stayed green. Added an integration job running verify_pipeline.sh (tape → Rust engine → metrics DB → journal seed → regime join); no Anthropic key required.

fix(dashboard) — color tokens, dead-filter and empty-state polish

  • Raw severity hex → --severity-* tokens (honors the "never raw hex in components" rule).
  • Dropped the dead vwap !== null filter in VwapChart (the column is NOT NULL).
  • Metrics empty-state now gates on all three series, not just ofi/volume.
  • Documented BACKEND_URL in .env.example.

Verification (all green, locally)

  • Engine: cargo fmt · clippy -D warnings · 15/15 tests (3 new: zero price, negative price, window overflow)
  • Backtest: ruff check + format · 71/71 pytest
  • Dashboard: lint · typecheck · 27/27 tests · build
  • Integration: verify_pipeline.sh (5000 ticks → 501 buckets → 12/12 journal joins)

claude added 3 commits July 23, 2026 19:08
Only `size` was validated at parse; `price` was not, yet it feeds VWAP
and the log-return `ln(price / prev)`. A zero, negative or non-finite
price produced `inf`/`NaN` realized volatility that was written to
SQLite and later serialized as invalid JSON. Add a `finite_positive_price`
serde validator mirroring `positive_size`, closing the same class of
latent hole the zero-size fix already addressed, and document the
now-guaranteed invariant at the log-return use site.

Also guard `parse_window` with `checked_mul`: a large `--window` overflowed
i64 and silently wrapped in release builds (the demo/build path). It now
returns a clear "too large" error instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ldy7vSi5nzVnDygUYUHV6P
The three per-stack jobs never exercised scripts/demo.sh or
scripts/verify_pipeline.sh, so the flagship `make demo` path could break
while CI stayed green. Add an `integration` job that runs
verify_pipeline.sh (tape -> Rust engine -> metrics DB -> journal seed ->
regime join); no Anthropic key required.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ldy7vSi5nzVnDygUYUHV6P
- Move the raw severity hex (#fab219/#ec835a) into --severity-* tokens in
  globals.css, honoring the "never raw hex in components" rule.
- Drop the dead `vwap !== null` filter in VwapChart (VolumeRow.vwap is a
  non-null number from the engine's NOT NULL column).
- Include volatility in the metrics empty-state check so all three series
  gate it, not just ofi/volume.
- Document BACKEND_URL (the dashboard's API proxy target) in .env.example.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ldy7vSi5nzVnDygUYUHV6P
@1816x
1816x merged commit c5a107d into main Jul 23, 2026
4 checks passed
@1816x
1816x deleted the claude/project-status-bugs-guezby branch July 23, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants